# The ecological distribution of the plant.

class Habitat < ActiveRecord::Base
  belongs_to :plant
  
  HABITAT_VALUES = [
  "forest",
  "alpine",
  "shrubland or scrub",
  "cliffs, ledges, rocks",
  "grassland",
  "disturbed ground",
  "vegetated wetland",
  "desert",
  "aquatic",
  "other"
  ].freeze
  
  protected
  
  def validate
    errors.add( :connotea_uri, " is required!") if connotea_uri.blank? unless content.blank?
  end
  
end
